Make it compile.
authorMatthias Clasen <mclasen@redhat.com>
Mon, 30 Aug 2004 13:16:39 +0000 (13:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 30 Aug 2004 13:16:39 +0000 (13:16 +0000)
2004-08-30  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.

2004-08-27  Matthias Clasen  <mclasen@redhat.com>

Fix #151112, Olexiy Avramchenko:

* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout):
* gtk/gtkiconview.c (scroll_timeout, layout_callback)
(gtk_icon_view_item_accessible_idle_do_action):
* gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle)
(popup_idle): Protect idle callbacks and timeouts with
GDK_THREADS_ENTER/_LEAVE.

* gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
call update_dialog() from an idle with the necessary protection.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c
gtk/gtkfilechooserbutton.c
gtk/gtkiconview.c
gtk/gtktextview.c
gtk/gtktreeview.c

index 8046c8c85e5ccedbf03b3aec6d18a1f6ef11b239..5a2a8041442ef3977aeae8124b14b445e41e3668 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2004-08-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.
+
+2004-08-27  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix #151112, Olexiy Avramchenko:
+       
+       * gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): 
+       * gtk/gtkiconview.c (scroll_timeout, layout_callback) 
+       (gtk_icon_view_item_accessible_idle_do_action): 
+       * gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle) 
+       (popup_idle): Protect idle callbacks and timeouts with 
+       GDK_THREADS_ENTER/_LEAVE.
+
+       * gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
+       call update_dialog() from an idle with the necessary protection.
+
 Mon Aug 30 01:34:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        Changes to make sure input methods respect the editability
@@ -61,6 +79,7 @@ Thu Aug 26 22:44:12 2004  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtkrange.h (struct _GtkRangeClass): Declare change_value
        function.
 
+>>>>>>> 1.5765
 2004-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/Makefile.am: Build imime.la on Windows.
index 8046c8c85e5ccedbf03b3aec6d18a1f6ef11b239..5a2a8041442ef3977aeae8124b14b445e41e3668 100644 (file)
@@ -1,3 +1,21 @@
+2004-08-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.
+
+2004-08-27  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix #151112, Olexiy Avramchenko:
+       
+       * gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): 
+       * gtk/gtkiconview.c (scroll_timeout, layout_callback) 
+       (gtk_icon_view_item_accessible_idle_do_action): 
+       * gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle) 
+       (popup_idle): Protect idle callbacks and timeouts with 
+       GDK_THREADS_ENTER/_LEAVE.
+
+       * gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
+       call update_dialog() from an idle with the necessary protection.
+
 Mon Aug 30 01:34:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        Changes to make sure input methods respect the editability
@@ -61,6 +79,7 @@ Thu Aug 26 22:44:12 2004  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtkrange.h (struct _GtkRangeClass): Declare change_value
        function.
 
+>>>>>>> 1.5765
 2004-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/Makefile.am: Build imime.la on Windows.
index 8046c8c85e5ccedbf03b3aec6d18a1f6ef11b239..5a2a8041442ef3977aeae8124b14b445e41e3668 100644 (file)
@@ -1,3 +1,21 @@
+2004-08-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.
+
+2004-08-27  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix #151112, Olexiy Avramchenko:
+       
+       * gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): 
+       * gtk/gtkiconview.c (scroll_timeout, layout_callback) 
+       (gtk_icon_view_item_accessible_idle_do_action): 
+       * gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle) 
+       (popup_idle): Protect idle callbacks and timeouts with 
+       GDK_THREADS_ENTER/_LEAVE.
+
+       * gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
+       call update_dialog() from an idle with the necessary protection.
+
 Mon Aug 30 01:34:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        Changes to make sure input methods respect the editability
@@ -61,6 +79,7 @@ Thu Aug 26 22:44:12 2004  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtkrange.h (struct _GtkRangeClass): Declare change_value
        function.
 
+>>>>>>> 1.5765
 2004-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/Makefile.am: Build imime.la on Windows.
index 8046c8c85e5ccedbf03b3aec6d18a1f6ef11b239..5a2a8041442ef3977aeae8124b14b445e41e3668 100644 (file)
@@ -1,3 +1,21 @@
+2004-08-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.
+
+2004-08-27  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix #151112, Olexiy Avramchenko:
+       
+       * gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): 
+       * gtk/gtkiconview.c (scroll_timeout, layout_callback) 
+       (gtk_icon_view_item_accessible_idle_do_action): 
+       * gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle) 
+       (popup_idle): Protect idle callbacks and timeouts with 
+       GDK_THREADS_ENTER/_LEAVE.
+
+       * gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
+       call update_dialog() from an idle with the necessary protection.
+
 Mon Aug 30 01:34:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        Changes to make sure input methods respect the editability
@@ -61,6 +79,7 @@ Thu Aug 26 22:44:12 2004  Matthias Clasen  <maclas@gmx.de>
        * gtk/gtkrange.h (struct _GtkRangeClass): Declare change_value
        function.
 
+>>>>>>> 1.5765
 2004-08-26  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/Makefile.am: Build imime.la on Windows.
index 0636b9488319f0cb3d80e238f0e2e300d2fee831..a5fb88f4fba807086e180f6804f483c0b7160bd5 100644 (file)
@@ -2706,9 +2706,13 @@ gtk_combo_box_model_row_changed (GtkTreeModel     *model,
 static gboolean
 list_popup_resize_idle (gpointer user_data)
 {
-  GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
+  GtkComboBox *combo_box;
   gint x, y, width, height;
 
+  GDK_THREADS_ENTER ();
+
+  combo_box = GTK_COMBO_BOX (user_data);
+
   if (combo_box->priv->tree_view &&
       GTK_WIDGET_MAPPED (combo_box->priv->popup_window))
     {
@@ -2718,6 +2722,8 @@ list_popup_resize_idle (gpointer user_data)
       gtk_window_move (GTK_WINDOW (combo_box->priv->popup_window), x, y);
     }
 
+  GDK_THREADS_LEAVE ();
+
   return FALSE;
 }
 
@@ -4718,13 +4724,19 @@ gtk_cell_editable_key_press (GtkWidget   *widget,
 static gboolean
 popdown_idle (gpointer data)
 {
-  GtkComboBox *combo_box = GTK_COMBO_BOX (data);
+  GtkComboBox *combo_box;
+
+  GDK_THREADS_ENTER ();
+
+  combo_box = GTK_COMBO_BOX (data);
   
   gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
   gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
 
   g_object_unref (combo_box);
 
+  GDK_THREADS_LEAVE ();
+
   return FALSE;
 }
 
@@ -4738,7 +4750,11 @@ popdown_handler (GtkWidget *widget,
 static gboolean
 popup_idle (gpointer data)
 {
-  GtkComboBox *combo_box = GTK_COMBO_BOX (data);
+  GtkComboBox *combo_box;
+
+  GDK_THREADS_ENTER ();
+
+  combo_box = GTK_COMBO_BOX (data);
 
   if (GTK_IS_MENU (combo_box->priv->popup_widget) &&
       combo_box->priv->cell_view)
@@ -4750,6 +4766,8 @@ popup_idle (gpointer data)
   combo_box->priv->editing_canceled = TRUE;
   gtk_combo_box_popup (combo_box);
   
+  GDK_THREADS_LEAVE ();
+
   return FALSE;
 }
 
index dd7baeda0137f304537c83cd4ebabaa50a96517e..a819a8d94060ba31182e5b15d9ca9ed119793056 100644 (file)
@@ -172,6 +172,7 @@ static void     gtk_file_chooser_button_set_dialog         (GObject          *ob
                                                            GtkWidget        *dialog);
 
 static gboolean update_dialog                              (gpointer          user_data);
+static gboolean update_dialog_idle                         (gpointer          user_data);
 static void     update_entry                               (GtkFileChooserButton *button);
 
 
@@ -949,6 +950,19 @@ update_dialog (gpointer user_data)
   return FALSE;
 }
 
+static gboolean
+update_dialog_idle (gpointer user_data)
+{
+  gboolean result;
+
+  GDK_THREADS_ENTER ();
+  result = update_dialog (user_data);
+  GDK_THREADS_LEAVE ();
+
+  return result;
+
+}
+
 /* ************************ *
  *  Child-Widget Callbacks  *
  * ************************ */
@@ -1117,5 +1131,5 @@ entry_changed_cb (GtkEditable *chooser_entry,
   /* We do this in an idle handler to avoid totally screwing up chooser_entry's
    * completion */
   if (priv->update_id != 0)
-    priv->update_id = g_idle_add (update_dialog, user_data);
+    priv->update_id = g_idle_add (update_dialog_idle, user_data);
 }
index 66b1f831c4209d4d64a7f50cdfce4c98008ccd37..69380d44b56262f611da7c970de83aeee12ae579 100644 (file)
@@ -872,6 +872,8 @@ scroll_timeout (gpointer data)
 {
   GtkIconView *icon_view;
   gdouble value;
+
+  GDK_THREADS_ENTER ();
   
   icon_view = data;
 
@@ -885,6 +887,8 @@ scroll_timeout (gpointer data)
 
   gtk_icon_view_update_rubberband (icon_view);
   
+  GDK_THREADS_LEAVE ();
+
   return TRUE;
 }
 
@@ -1936,12 +1940,16 @@ layout_callback (gpointer user_data)
 {
   GtkIconView *icon_view;
 
+  GDK_THREADS_ENTER ();
+
   icon_view = GTK_ICON_VIEW (user_data);
   
   icon_view->priv->layout_idle_id = 0;
 
   gtk_icon_view_layout (icon_view);
   
+  GDK_THREADS_LEAVE();
+
   return FALSE;
 }
 
@@ -3530,17 +3538,20 @@ gtk_icon_view_item_accessible_idle_do_action (gpointer data)
   GtkIconView *icon_view;
   GtkTreePath *path;
 
+  GDK_THREADS_ENTER ();
+
   item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (data);
   item->action_idle_handler = 0;
 
-  if (item->widget == NULL)
-    return FALSE;
-
-  icon_view = GTK_ICON_VIEW (item->widget);
+  if (item->widget != NULL)
+    {
+      icon_view = GTK_ICON_VIEW (item->widget);
+      path = gtk_tree_path_new_from_indices (item->item->index, -1);
+      gtk_icon_view_item_activated (icon_view, path);
+      gtk_tree_path_free (path);
+    }
 
-  path = gtk_tree_path_new_from_indices (item->item->index, -1);
-  gtk_icon_view_item_activated (icon_view, path);
-  gtk_tree_path_free (path);
+  GDK_THREADS_LEAVE ();
 
   return FALSE;
 }
index a350f87781822c00462a3dcbbf331c00019de585..a02e0afb7811e2e0c034c8d80307d2bd5b9436bf 100644 (file)
@@ -6678,7 +6678,8 @@ gtk_text_view_delete_surrounding_handler (GtkIMContext  *context,
   gtk_text_iter_forward_chars (&start, offset);
   gtk_text_iter_forward_chars (&end, offset + n_chars);
 
-  gtk_text_buffer_delete_interactive (text_view->buffer, &start, &end);
+  gtk_text_buffer_delete_interactive (text_view->buffer, &start, &end,
+                                     text_view->editable);
 
   return TRUE;
 }
index e4c81feeb9316872506b6c3cc6449023b86b8d5f..3746ad56329924edd293a23a85310ff0c01c76b9 100644 (file)
@@ -8815,8 +8815,13 @@ gtk_tree_view_real_select_cursor_parent (GtkTreeView *tree_view)
 static gboolean
 gtk_tree_view_search_entry_flush_timeout (GtkTreeView *tree_view)
 {
+  GDK_THREADS_ENTER ();
+
   gtk_tree_view_search_dialog_hide (tree_view->priv->search_window, tree_view);
   tree_view->priv->typeselect_flush_timeout = 0;
+
+  GDK_THREADS_LEAVE ();
+
   return TRUE;
 }